<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Experimental/Independent Film Community</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="description" content="An Independent Film Community" />
<meta name="copyright" content="Cmpe451-ProjectGroup#8" />
<link href="./jsp/user/style/expind-std.css" rel="stylesheet"
	type="text/css" />
<link href="./jsp/user/style/expind.css" rel="stylesheet"
	type="text/css" />
<script language="javascript"
	src="./jsp/user/scripts/jquery-1.8.2.min.js"></script>
<script language="javascript" src="./jsp/user/scripts/expind.js"></script>
</head>
<body>
	<div class="container_24">
		<jsp:include page="header.jsp" />
		<div>
			<c:if test="${requestScope.user.uid eq sessionScope.user.uid }">
				<select id="profile-options">
					<option value="1">Display Profile</option>
					<option value="2">Edit Profile</option>
					<option value="3">Change Password</option>
				</select>
				<div class="grid_24 hr-line2"></div>
			</c:if>
			<table width="750px">
				<tr>
					<td>
						<table>
							<tr>
								<td style="padding: 5px"><input type="hidden" name="unique"
									value="${requestScope.user.uid}" /> <img
									src=<c:out value="${ requestScope.user.imageURL}"/>
									title=<c:out value="${ requestScope.user.name }"/>
									width="180px" />
									<form action="rating" method="post" name="rating">
										<table>
											<tr>
												<td colspan="2" style=""><span
													class="grid_4 comment-star star${requestScope.user.roundedRate }"></span>
												</td>
											</tr>
											<c:if
												test="${sessionScope.user ne null && requestScope.user.uid ne sessionScope.user.uid && not hasRatedBefore}">
												<tr>
													<td><select name="selrate" id="selrate">
															<option value="1">Very Bad</option>
															<option value="2">Bad</option>
															<option value="3">Medium</option>
															<option value="4" selected="selected">Good</option>
															<option value="5">Very Good</option>
													</select></td>
													<td><input type="button"
														onclick="javascript:ratingValidation();" value="Rate" /></td>
												</tr>
											</c:if>
										</table>
										<input type="hidden" name="currurl" /> <input type="hidden"
											name="type" value="user" />
									</form></td>
								<td>
									<table>
										<tr>
											<td colspan="2">
												<div class="title-style">
													<c:out value="${ requestScope.user.name }"></c:out>
													<div class="user-title">
														<c:forEach var="title" items="${requestScope.user.titles}">
															${title.titleShowName},
														</c:forEach>
													</div>
												</div> <c:choose>
													<c:when test="${requestScope.user.available }">
														<div class="availability-style" style="color: green">Available
														</div>
													</c:when>
													<c:otherwise>
														<div class="availability-style" style="color: red">Unavailable
														</div>
													</c:otherwise>
												</c:choose>
											</td>
										</tr>
										<tr>
											<td colspan="2" style="vertical-align: top; width: 300">
												<div class="info-style">
													<c:out value="${requestScope.user.summary}" />
													<div class="grid_15 hr-line2"></div>
													<div class="clear height10"></div>

												</div>
											</td>
										</tr>
										<tr>
											<td width="180px"><a id="detailed-features" href="#">Detailed
													Features</a>
												<div id="detailed-features-output" style="display: none;">
													Birth Date:
													<c:out value="${requestScope.user.dayOfBirth}" />
													-
													<c:out value="${requestScope.user.monthOfBirth + 1}" />
													-
													<c:out value="${requestScope.user.yearOfBirth}" />
													<br />
													<c:if test="${not empty requestScope.user.actorFeatures }">
														Height: <c:out
															value="${requestScope.user.actorFeatures.height }" />
														<br />
													Weight: <c:out
															value="${requestScope.user.actorFeatures.weight }" />
														<br />
													Hair: <c:out
															value="${requestScope.user.actorFeatures.hairColor }" />
														<br />
													Eyes: <c:out
															value="${requestScope.user.actorFeatures.eyeColor }" />
														<br />
													Skin: <c:out
															value="${requestScope.user.actorFeatures.skinColor }" />
													</c:if>
												</div></td>
											<td><a id="contact" href="#">Contact</a>
												<div id="contact-output" style="display: none;">
													Email:${requestScope.user.email}<br /> Tel:
													<c:if test="${requestScope.user.tel ne -1}">${requestScope.user.tel}</c:if>
													<br /> City:${requestScope.user.city}
												</div></td>
										</tr>
									</table>
								</td>
							</tr>

						</table>
					</td>
				</tr>
				<tr>
					<td style="padding-left: 180px"><c:set var="count" value="0"
							scope="request" /> <c:forEach var="mov" items="${directed}">
							<c:if
								test="${not empty sessionScope.user || (empty sessionScope.user && mov.completed)}">
								<div class="grid_6 user-movie alpha omega">
									<!-- kitap şeysi BAŞLA 1 -->
									<div class="grid_4 prefix_1 user-movie-img">
										<a href="movie?which=${mov.mid}" title="#"><img
											src="${mov.poster}" alt="Sin City" width="100px" /></a> <span
											style="margin-left: 35px"
											class="grid_4 suffix_15 comment-star star${mov.roundedRate}" />
									</div>
									<div class="grid_6 movie-name">
										<a href="movie?which=${mov.mid}" title="#">${mov.name}</a> <br />
										<c:if test="${not mov.completed }">
											<div style="color: blue; font-size: 12px">-ongoing-</div>
										</c:if>
										as director
									</div>
									<div class="grid_6 go-to-movie-button">
										<a href="movie?which=${mov.mid}" title="">Go To Movie</a>
									</div>
								</div>
								<c:set var="count" value="${count+1}" scope="request" />
								<c:if test="${count % 4 == 0 }">
									<div class="clear height20"></div>
								</c:if>
							</c:if>
						</c:forEach> <c:forEach var="mov" items="${acted}">
							<c:if
								test="${not empty sessionScope.user || (empty sessionScope.user && mov.completed)}">
								<div class="grid_6 user-movie alpha omega">
									<!-- kitap şeysi BAŞLA 1 -->
									<div class="grid_4 prefix_1 user-movie-img">
										<a href="movie?which=${mov.mid}" title="#"><img
											src="${mov.poster}" alt="Sin City" width="100px" /></a> <span
											style="margin-left: 35px"
											class="grid_4 suffix_15 comment-star star${mov.roundedRate}" />
									</div>
									<div class="grid_6 movie-name">
										<a href="movie?which=${mov.mid}" title="#">${mov.name}</a> <br />
										<c:if test="${not mov.completed }">
											<div style="color: blue; font-size: 12px">-ongoing-</div>
										</c:if>
										as actor
									</div>
									<div class="grid_6 go-to-movie-button">
										<a href="movie?which=${mov.mid}" title="">Go To Movie</a>
									</div>
								</div>
								<c:set var="count" value="${count+1}" scope="request" />
								<c:if test="${count % 4 == 0 }">
									<div class="clear height20"></div>
								</c:if>
							</c:if>
						</c:forEach> <c:forEach var="mov" items="${worked}">
							<c:if
								test="${not empty sessionScope.user || (empty sessionScope.user && mov.key.completed)}">
								<div class="grid_6 user-movie alpha omega">
									<!-- kitap şeysi BAŞLA 1 -->
									<div class="grid_4 prefix_1 user-movie-img">
										<a href="movie?which=${mov.key.mid}" title="#"><img
											src="${mov.key.poster}" alt="Sin City" width="100px" /></a> <span
											style="margin-left: 35px"
											class="grid_4 suffix_15 comment-star star${mov.key.roundedRate}" />
									</div>
									<div class="grid_6 movie-name">
										<a href="movie?which=${mov.key.mid}" title="#">${mov.key.name}</a>
										<c:if test="${not mov.key.completed }">
											<div style="color: blue; font-size: 12px">-ongoing-</div>
										</c:if>
										<br /> as ${mov.value}
									</div>
									<div class="grid_6 go-to-movie-button">
										<a href="movie?which=${mov.key.mid}" title="">Go To Movie</a>
									</div>
								</div>
								<c:set var="count" value="${count+1}" scope="request" />
								<c:if test="${count % 4 == 0 }">
									<div class="clear height20"></div>
								</c:if>
							</c:if>
						</c:forEach></td>
				</tr>
				<tr>
					<td style="padding-left: 180px"><c:forEach var="comment"
							items="${comments}">
							<table>
								<tr>
									<td>
										<div class="grid_4 comment-user">
											<span class="grid_4 comment-user-name">
												${comment.userS.name}</span> <span class="grid_4 comment-date">
												${comment.timestamp} </span>
										</div>
									</td>
									<td style="vertical-align: bottom;">
										<div class="grid_19 comment-content">${comment.comment }</div>
									</td>
								</tr>
							</table>
							<div class="grid_24 hr-line2"></div>
						</c:forEach></td>
				</tr>
				<c:if
					test="${not empty sessionScope.user && requestScope.user.uid ne sessionScope.user.uid  }">
					<tr>
						<td id="comment" style="padding-left: 180px">
							<div class="alpha comment-do">
								<!-- YORUM YAP BAŞLA (GİRİŞ YAPMAMIŞ KULLANICI İÇİN) -->
								<form action="comment-on" method="post" class="comment-form"
									name="commentOn">
									<div>Comment:</div>
									<div class="grid_18">
										<textarea name="comment" id="yorumb" rows="5" cols="50"> </textarea>
										<br /> <input type="button" name="add" value="Comment"
											onclick="javascript:commentValidation();" />
									</div>
									<input type="hidden" name="currurl" /> <input type="hidden"
										name="type" value="user" />
								</form>
							</div>
						</td>
					</tr>
				</c:if>
			</table>
		</div>
	</div>
	<!-- wrapper BİTİŞ -->
</body>
</html>
